home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d16 / winbatch.arc / DOSPASTE.WBT < prev    next >
Text File  |  1991-05-22  |  750b  |  21 lines

  1. ; An Example of pasting data to a DOS window
  2. ; We will paste DIR and CHKDSK, PAUSE and EXIT to as DOS window
  3.  
  4.  
  5.  if !(WinConfig() & 32) then goto NOGO   ; Check for 386 enhanced mode
  6.  
  7.  Pause("Please Note:","This WBT file starts a command.com window.  Type EXIT to close the window.")
  8.  ReturnKey=Strcat(num2char(13))
  9.  CommandToType="DIR %ReturnKey% CHKDSK %ReturnKey%"
  10.  ClipPut(CommandToType)
  11.  RunIcon(Environment("COMSPEC"),"")   ;Get command.com from COMSPEC in environment
  12.  WinActivate("COMMAND")
  13.  SendKey("! TW~")  ;Sendkey to set "windowed" mode...not full screen
  14.  WinShow("COMMAND")
  15.  SendKey("! EP")   ; SendKey Alt-Space Edit Paste
  16.  Exit
  17.  
  18.  
  19.  :NOGO
  20.  Message("Ooops!","Can only paste to DOS apps when in 386 enhanced mode")
  21.